#ifndef __GENE_CREATE_DATA__BASE__IMPLEMENTATION
#define __GENE_CREATE_DATA__BASE__IMPLEMENTATION

#include "GeneCreateDataIf.h"


//
//	dynamic data interface for creating an gene
//	different gene will require different environment data when create it.
//	implement this interface to ensure anything is possible for gene creation.
//
class TCOM_API  GeneCreateDataB : public IGeneCreateData
{
public:
	GeneCreateDataB(int nID, int nGrpID);
	GeneCreateDataB(IData* pData);
	virtual ~GeneCreateDataB();

	//	
	//	ID
	//
	virtual void	setID(int nID);
	virtual int		getID()const;

	//
	//	Group ID
	//
	virtual void	setGroupID(int nGrpID);
	virtual int		getGroupID()const;	

	//
	//	Class identifier
	//
	virtual int		getClass()const;

	//
	//	Data X, Y, Z
	//	Which is used most frequently
	//
	virtual void	setDataX(int x);
	virtual void	setDataY(int y);
	virtual void	setDataZ(int z);

	virtual int		getDataX()const;
	virtual int		getDataY()const;
	virtual int		getDataZ()const;

	//
	//	Data Extension, more data
	//
	virtual	int		getData(const short& nIdx, int nDefault)const;
	virtual void	setData(const short& nIdx, int nValue);

	//
	//	get the static data
	//	
	virtual IData*		getStaticData();

	//
	//	Time to live for an gene on his host
	//	This will override the duration that configured in gene static data
	//
	virtual int			getDuration()const;

	//
	//	entity
	//
	virtual int			getSrcEntityID()const;
	virtual IEntity*	getSrcEntity()const;
	virtual IScene*		getSrcScene()const;
protected:
	int	m_nGeneID;
	int	m_nGeneGrpID;
	IData* m_wpSData;

	int m_nArgX;
	int m_nArgY;
	int m_nArgZ;

};

#endif
